package com.anysoft.webloader;

import com.anysoft.util.Properties;
import com.anysoft.util.Settings;
import javax.servlet.ServletContext;

/**
 * 基于ServletContext的Properties
 */
public class ServletContextProperties extends Properties.Abstract {

    protected ServletContext servletContext = null;

    public ServletContextProperties(ServletContext sc){
        super("ServletConfig", Settings.get());
        servletContext = sc;
    }

    protected void _SetValue(String _name, String _value) {
        //do nothing
    }

    protected String _GetValue(String name) {
        return servletContext != null?servletContext.getInitParameter(name):null;
    }

    public void Clear() {
        // do nothing
    }

}